<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserProfilesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_profiles', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer("user_id")->unique()->comment("用户id");
            $table->string("real_name",20)->nullable()->comment("真实姓名");
            $table->string("nick_name",50)->nullable()->comment("昵称");
            $table->boolean("sex")->default(0)->comment("性别");
            $table->string("login_ip",20)->nullable()->comment("登录ip");
            $table->string("qq",20)->nullable()->comment("qq号码");
            $table->integer("login_count")->default(0)->comment("登录次数");
            $table->tinyInteger("information_status")->default(0)->comment("资料是否公开，0私有，1公开");
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_profiles');
    }
}
